package com.codi.bus.core.service.organ;

/**
 * Created by wangzhenhao on 2017/9/6.
 */

import com.codi.base.exception.BaseAppException;
import com.codi.bus.core.domain.OrgFile;
import com.codi.bus.core.resultModel.OrganFileResult;

import java.util.List;

/**
 * 上传机构文件
 */
public interface OrgFileService {
    OrgFile query(Long fileId);

    OrgFile save(OrganFileResult sysFileModel) throws BaseAppException;

    OrgFile getOrgFileByUserIdAndFileType(Long userId, String fileType, Long profileId);

    OrgFile getOrgFileByUserIdAndFileTypeAndProfileId(Long userId, String fileType, Long profileId);

    int delete(Long id) throws BaseAppException;

    int delete(String uniqueFileName) throws BaseAppException;

    int update(OrgFile sysFile) throws BaseAppException;

    List<OrganFileResult> queryFiles(Integer pageIndex, Integer pageSize) throws BaseAppException;

    List<OrganFileResult> queryFilesBySearchContent(Integer pageIndex, Integer pageSize, String searchContent);

    Long queryFilesCount() throws BaseAppException;

    List<OrganFileResult> queryFilesByFileName(String fileName, Integer pageIndex, Integer pageSize);

    List<OrganFileResult> queryFilesByUserId(Long userId);

    List<OrganFileResult> queryFilesByUserIdAndProfileId(Long userId, Long profileId);

    List<OrganFileResult> queryFilesByProfileId(Long profileId);

    int queryCountByFileName(String fileName);

    boolean checkDataIntegrity(Long userId, Long profileId);

    List<OrganFileResult> queryPictures(Integer pageIndex, Integer pageSize);

    int queryPictureCount();
}
